import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home/tongchou'
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    children: [{
      path: 'tongchou',
      meta: {
        title: '统筹首页'
      },
      redirect: '/home/tongchou/QSguihua',
      component: () => import('@/views/tongchou/quanshi'),
      children: [
        {
          path: 'QSguihua',
          name: 'QSguihua',
          meta: {
            title: '全市发展规划'
          },
          component: () => import('@/views/tongchou/quanshi/guihua')
        },
        {
          path: 'QSguihuaAdd',
          name: 'QSguihuaAdd',
          meta: {
            title: '全市发展规划新增'
          },
          component: () => import('@/views/tongchou/quanshi/guihuaAdd')
        },
        {
          path: 'QSguihuaDetail',
          name: 'QSguihuaDetail',
          meta: {
            title: '全市发展规划新增'
          },
          component: () => import('@/views/tongchou/quanshi/guihuaDetail')
        },
        {
          path: 'ZXguihua',
          name: 'ZXguihua',
          meta: {
            title: '专项发展规划'
          },
          component: () => import('@/views/tongchou/zhuanxiang/guihua')
        },
        {
          path: 'ZXguihuaAdd',
          name: 'ZXguihuaAdd',
          meta: {
            title: '专项发展规划新增'
          },
          component: () => import('@/views/tongchou/zhuanxiang/guihuaAdd')
        },
        {
          path: 'ZXguihuaDetail',
          name: 'ZXguihuaDetail',
          meta: {
            title: '专项发展规划新增'
          },
          component: () => import('@/views/tongchou/zhuanxiang/guihuaAdd')
        },
        {
          path: 'ZXguihuashujuju',
          name: 'ZXguihuashujuju',
          meta: {
            title: '专项发展规划审核'
          },
          component: () => import('@/views/tongchou/zhuanxiang/guihuashujuju')
        },
        {
          path: 'ZXguihuashujujuDetail',
          name: 'ZXguihuashujujuDetail',
          meta: {
            title: '专项发展规划详情'
          },
          component: () => import('@/views/tongchou/zhuanxiang/guihuashujujuDetail')
        },
        {
          path: 'ZXguihuashujujuAdd',
          name: 'ZXguihuashujujuAdd',
          meta: {
            title: '专项发展规划新增'
          },
          component: () => import('@/views/tongchou/zhuanxiang/guihuashujujuAdd')
        },
        {
          path: 'ZCQxiangmuList',
          name: 'ZCQxiangmuList',
          meta: {
            title: '中长期项目库'
          },
          component: () => import('@/views/tongchou/zhongchangqi/changqi')
        },

        {
          path: 'ZCQxiangmusujujuList',
          name: 'ZCQxiangmusujujuList',
          meta: {
            title: '中长期项目库管理数据局'
          },
          component: () => import('@/views/tongchou/zhongchangqi/changqishujuju')
        },
        {
          path: 'ZCQxiangmuAdd',
          name: 'ZCQxiangmuAdd',
          meta: {
            title: '添加中长期项目库'
          },
          component: () => import('@/views/tongchou/zhongchangqi/changqiAdd')
        },
        {
          path: 'ZCQxiangmuDetail',
          name: 'ZCQxiangmuDetail',
          meta: {
            title: '中长期项目库详情'
          },
          component: () => import('@/views/tongchou/zhongchangqi/changqiDetail')
        }
      ]
    },
      {
        path: 'shenbao',
        name: 'shenbao',
        meta: {
          title: '年度计划申报'
        },
        redirect: '/home/shenbao/jihua',
        component: () => import('@/views/shenbao'),
        children: [{
          path: 'index',
          name: 'index',
          meta: {
            title: '数据局列表'
          },
          component: () => import('../views/shenbao/home/index')
        },
        {
          path: 'indexAddManage',
          name: 'indexAddManage',
          meta: {
            title: '数据局列表'
          },
          component: () => import('../views/shenbao/home/component/addManage.vue')
        },
        {
        path: 'manage',
        name: 'manage',
        meta: {
          title: '申报确认'
        },
        component: () => import('../views/shenbao/manage')
      },
      {
        path: 'consultation',
        name: 'consultation',
        meta: {
          title: '贷联合会商'
        },
        component: () => import('../views/shenbao/consultation')
      },
      {
        path: 'details',
        name: 'details',
        meta: {
          title: '详情'
        },
        component: () => import('../views/shenbao/details')
      },
      {
        path: 'plan',
        name: 'plan',
        meta: {
          title: '统筹方案上传'
        },
        component: () => import('../views/shenbao/plan')
      },
      {
        path: 'answer',
        name: 'answer',
        meta: {
          title: '变更申请待批复'
        },
        component: () => import('../views/shenbao/answer')
      },
          {
            path: 'jihua',
            name: 'jihua',
            meta: {
              title: '年度计划申报'
            },
            component: () => import('@/views/shenbao/jihuashenbao/jihua/jihua')
          },
          {
            path: 'jihuaAdd',
            name: 'jihuaAdd',
            meta: {
              title: '年度计划申报新增'
            },
            component: () => import('@/views/shenbao/jihuashenbao/jihua/jihuaAdd')
          },
          {
            path: 'jihuaDetail',
            name: 'jihuaDetail',
            meta: {
              title: '年度计划申报详情'
            },
            component: () => import('@/views/shenbao/jihuashenbao/jihua/jihuaDetail')
          },
          {
            path: 'xiangmu',
            meta: {
              title: '项目申报管理'
            },
            component: () => import('@/views/shenbao/jihuashenbao/xiangmu')
          },
        {
          path: 'xiangmuAdd',
          name: 'xiangmuAdd',
          meta: {
            title: '申报管理'
          },
          component: () => import('@/views/shenbao/jihuashenbao/xiangmu/component/addManage')
        }, 
        // {
        //         path: 'xiangmuDetail',
        //         name: 'xiangmuDetail',
        //         meta: {
        //           title: '申报管理'
        //         },
        //         component: () => import('@/views/shenbao/jihuashenbao/xiangmu/component/detailManage')
        //       },
        {
          path: 'xiangmushujuju',
          meta: {
            title: '项目申报管理'
          },
          component: () => import('@/views/shenbao/jihuashenbao/shenbaoshujuju/answer')
        },
        {
          path: 'beian',
          meta: {
            title: '项目备案登记'
          },
          component: () => import('@/views/shenbao/beian/index')
        },
          {
            path: 'beianDetail',
            meta: {
              title: '项目备案登记详情'
            },
            component: () => import('@/views/shenbao/beian/component/detail')
          },
          {
            path: 'beianAdd',
            name: 'beianAdd',
            meta: {
              title: '项目备案登记新增'
            },
            component: () => import('@/views/shenbao/beian/component/add')
          },
          {
            path: 'beianList',
            meta: {
              title: '项目备案-数据局'
            },
            component: () => import('@/views/shenbao/beian/dengji')
          },
      ]
    },
      {
        path: 'beian',
        meta: {
          title: '项目备案登记'
        },
        component: () => import('@/views/shenbao/beian'),
        children: [
          {
            path: 'beianDetail',
            meta: {
              title: '项目备案登记详情'
            },
            component: () => import('@/views/shenbao/beian/component/detail')
          },
          {
            path: 'beianAdd',
            meta: {
              title: '项目备案登记新增'
            },
            component: () => import('@/views/shenbao/beian/component/add')
          }
        ]
      },
      {
        path: 'shenpi',
        meta: {
          title: '审批首页'
        },
        redirect: '/home/shenpi/keyan',
        component: () => import('@/views/shenpi'),
        children: [{
          path: 'keyan',
          name: 'keyanList',
          meta: {
            title: '项目可研评审'
          },
          component: () => import('@/views/shenpi/keyan'),
          children: [{
            path: 'add',
            name: 'addkeyan',
            meta: {
              title: '新增项目可研评审'
            },
            component: () => import('@/views/shenpi/keyan/add')
          }, {
            path: 'view',
            name: 'viewkeyan',
            meta: {
              title: '查看项目可研评审'
            },
            component: () => import('@/views/shenpi/keyan/view')
          }, {
            path: 'shujuju',
            name: 'shujuju',
            meta: {
              title: '数据局管理'
            },
            component: () => import('@/views/shenpi/keyan/list/table')
          }, {
            path: 'querenshenqing',
            name: 'querenshenqing',
            meta: {
              title: '数据局确认申请'
            },
            component: () => import('@/views/shenpi/keyan/list/querenshenqing')
          }, {
            path: 'yushen',
            name: 'yushen',
            meta: {
              title: '数据局预审'
            },
            component: () => import('@/views/shenpi/keyan/list/yushen')
          }, {
            path: 'lianhe',
            name: 'lianhe',
            meta: {
              title: '数据局提交联合评审意见'
            },
            component: () => import('@/views/shenpi/keyan/list/lianhe')
          }, {
            path: 'xiada',
            name: 'xiada',
            meta: {
              title: '数据局下达批复'
            },
            component: () => import('@/views/shenpi/keyan/list/xiada')
          }, {
            path: 'fagai',
            name: 'fagai',
            meta: {
              title: '数据局联合发改初审'
            },
            component: () => import('@/views/shenpi/keyan/list/fagai')
          }, {
            path: 'shizhang',
            name: 'shizhang',
            meta: {
              title: '数据局市长审定'
            },
            component: () => import('@/views/shenpi/keyan/list/shizhang')
          }, {
            path: 'projectxiada',
            name: 'projectxiada',
            meta: {
              title: '数据局下达批复'
            },
            component: () => import('@/views/shenpi/keyan/list/projectxiada')
          }, {
            path: 'detail',
            name: 'detail',
            meta: {
              title: '数据局下达批复'
            },
            component: () => import('@/views/shenpi/keyan/list/detail')
          }]
        }, {
          path: 'chushe',
          name: 'chushe',
          meta: {
            title: '项目初设及概算评审'
          },
          component: () => import('@/views/shenpi/chushe')
        }, {
          path: 'addChushe',
          name: 'addChushe',
          meta: {
            title: '项目初设及概算评审'
          },
          component: () => import('@/views/shenpi/chushe/component/add')
        }, {
          path: 'chusheDetail',
          name: 'chusheDetail',
          meta: {
            title: '项目初设及概算评审'
          },
          component: () => import('@/views/shenpi/chushe/component/detail')
        }, {
          path: 'chusheshujuju',
          name: 'chusheshujuju',
          meta: {
            title: '项目初设及概算数据据管理'
          },
          component: () => import('@/views/shenpi/chushe/shujuju/table')
        }, {
          path: 'chusheupload',
          name: 'chusheupload',
          meta: {
            title: '项目初设数据局上传评审意见'
          },
          component: () => import('@/views/shenpi/chushe/shujuju/upload')
        }, {
          path: 'chushelianhe',
          name: 'chushelianhe',
          meta: {
            title: '项目初设数据局联合评审意见'
          },
          component: () => import('@/views/shenpi/chushe/shujuju/lianhe')
        }, {
          path: 'chushexiada',
          name: 'chushexiada',
          meta: {
            title: '项目初设数据局下达批复'
          },
          component: () => import('@/views/shenpi/chushe/shujuju/xiada')
        }, {
          path: 'chushedetail',
          name: 'chushedetail',
          meta: {
            title: '项目初设数据局下达批复成功后详情'
          },
          component: () => import('@/views/shenpi/chushe/shujuju/detail')
        }, {
          path: 'shidian',
          name: 'shidian',
          meta: {
            title: '试点项目申报预审'
          },
          component: () => import('@/views/shenpi/shidian')
        }, {
          path: 'shidianshujuju',
          name: 'shidianshujuju',
          meta: {
            title: '试点项目申报预审数据局列表'
          },
          component: () => import('@/views/shenpi/shidian/shujuju/table')
        }, {
          path: 'shidianshujujuyushen',
          name: 'shidianshujujuyushen',
          meta: {
            title: '试点项目申报预审数据局预审'
          },
          component: () => import('@/views/shenpi/shidian/shujuju/yushen')
        }, {
          path: 'shidianshujujuupload',
          name: 'shidianshujujuupload',
          meta: {
            title: '试点项目申报预审数据局上传批复结果'
          },
          component: () => import('@/views/shenpi/shidian/shujuju/upload')
        }, {
          path: 'shidianshujujudetail',
          name: 'shidianshujujudetail',
          meta: {
            title: '试点项目申报预审数据局上传批复结果'
          },
          component: () => import('@/views/shenpi/shidian/shujuju/detail')
        }, {
          path: 'companyshujujuDetail',
          name: 'companyshujujuDetail',
          meta: {
            title: '试点项目申报预审数据局查看'
          },
          component: () => import('@/views/shenpi/shidianshujuju/component/detail')
        }, {
          path: 'addCompany',
          name: 'addCompany',
          meta: {
            title: '试点项目申报预审'
          },
          component: () => import('@/views/shenpi/shidian/component/add')
        }, {
          path: 'companyDetail',
          name: 'companyDetail',
          meta: {
            title: '试点项目申报预审'
          },
          component: () => import('@/views/shenpi/shidian/component/detail')
        }
        ]
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
